//
//  DCChatExtraView.h
//  xmppBase
//
//  Created by striby on 16/1/8.
//  Copyright © 2016年 com.dc. All rights reserved.
//

#import <UIKit/UIKit.h>


static const float chatExtraViewHeight = 200;

static const float pageControlHeight = 30;

static const float extraIconRate = .5;

static const int labelFontSize = 13;

#define extraIcon @"extraIcon"

#define extraName @"extraName"

@class DCChatExtraView;

@protocol DCChatExtraViewDelegate <NSObject>

-(void)chatExtraView:(DCChatExtraView* )extraView selectedForIndex:(NSInteger)index;

@end

@interface DCChatExtraView : UIView<UIScrollViewDelegate>

@property(nonatomic,strong)UIScrollView * contentScrollView;
/**
 *  获取单例对象
 */
+(DCChatExtraView*)shareInstanceInView:(UIView*)superView;

@property(nonatomic,strong)id<DCChatExtraViewDelegate> delegate;

/**
 *   页面索引
 */
@property(nonatomic,strong,readonly)UIPageControl * pageControl;
/**
 *  设置视图对象 @[@{extraIcon:@"image.png",extraName:@"功能"} ]
 */
-(void)setItems:(NSArray *)items;

-(void)showExtraViewWithDuration:(float)duration isUsingAnination:(BOOL)useAnimation animations:(void (^ __nullable)(void))animations completion:(void (^ __nullable)(BOOL finished))completion ;

-(void)hideExtraViewWithDuration:(float)duration isUsingAnination:(BOOL)useAnimation animations:(void (^ __nullable)(void))animations completion:(void (^ __nullable)(BOOL finished))completion;

@end
